require("../../@babel/runtime/helpers/Arrayincludes"), (global.webpackJsonp = global.webpackJsonp || []).push([ [ "components/confirm-fee-popup/index" ], {
    "0787": function(e, n, t) {
        t.d(n, "b", function() {
            return i;
        }), t.d(n, "c", function() {
            return o;
        }), t.d(n, "a", function() {});
        var i = function() {
            var e = this, n = (e.$createElement, e._self._c, e.__map(e.unconfirmedBills, function(n, t) {
                return {
                    $orig: e.__get_orig(n),
                    g0: [ 16, 13 ].includes(n.bill_type)
                };
            })), t = e.billPriceItem.length, i = t > 0 ? e.__map(e.billPriceItem, function(n, t) {
                var i = e.__get_orig(n), o = n.receipt_urls ? n.receipt_urls.length : null, r = n.receipt_urls ? n.receipt_urls.length : null;
                return {
                    $orig: i,
                    g2: o,
                    g3: r,
                    g4: n.receipt_urls && r > 1 ? n.receipt_urls.length : null
                };
            }) : null;
            e.$mp.data = Object.assign({}, {
                $root: {
                    l0: n,
                    g1: t,
                    l1: i
                }
            });
        }, o = [];
    },
    "13f9": function(e, n, t) {},
    "3d48": function(e, n, t) {
        var i = t("13f9");
        t.n(i).a;
    },
    "408c": function(e, n, t) {
        t.r(n);
        var i = t("0787"), o = t("6be4");
        for (var r in o) [ "default" ].indexOf(r) < 0 && function(e) {
            t.d(n, e, function() {
                return o[e];
            });
        }(r);
        t("3d48");
        var c = t("f0c5"), u = Object(c.a)(o.default, i.b, i.c, !1, null, "d010c1c0", null, !1, i.a, void 0);
        n.default = u.exports;
    },
    "47aa": function(e, n, t) {
        (function(e) {
            var i = t("4ea4").default;
            Object.defineProperty(n, "__esModule", {
                value: !0
            }), n.default = void 0;
            var o = t("48b8"), r = t("560a"), c = t("4ef0"), u = i(t("2de2")), a = {
                components: {
                    bottomPopup: function() {
                        Promise.all([ t.e("common/vendor"), t.e("components/bottom-popup/index") ]).then(function() {
                            return resolve(t("54a1"));
                        }.bind(null, t)).catch(t.oe);
                    },
                    LoginButton: function() {
                        t.e("components/login-button/index").then(function() {
                            return resolve(t("43d3"));
                        }.bind(null, t)).catch(t.oe);
                    }
                },
                props: {
                    orderInfo: {
                        type: Object,
                        default: function() {
                            return {};
                        }
                    },
                    pageFrom: {
                        type: String,
                        default: ""
                    }
                },
                data: function() {
                    return {
                        isShow: !1,
                        unconfirmedBills: []
                    };
                },
                computed: {
                    isDisabled: function() {
                        var e = !1;
                        return this.unconfirmedBills.forEach(function(n) {
                            0 !== n.accept || (e = !0);
                        }), e;
                    },
                    billPriceItem: function() {
                        return this.unconfirmedBills.filter(function(e) {
                            return e.receipt_urls;
                        });
                    },
                    isPayCode: function() {
                        return "payCode" === this.pageFrom;
                    }
                },
                methods: {
                    open: function(e) {
                        var n = this, t = e.data;
                        return t.unconfirmed_bills.forEach(function(e) {
                            e.accept = 0, e.amountYuan = (0, o.fenToYuan)(e.amount);
                        }), this.unconfirmedBills = t.unconfirmed_bills, new Promise(function(e) {
                            n.isShow = !0, n.callResolve = e, n.isPayCode && n.$statistics("extra_fee_popup_expo", {
                                order_uuid: n.orderInfo.order_uuid
                            });
                        });
                    },
                    hide: function() {
                        var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "close";
                        this.isShow = !1, this.callResolve && this.callResolve({
                            type: e
                        });
                    },
                    handleAccept: function(e, n) {
                        var t = this.unconfirmedBills[e];
                        t.accept = n, this.$set(this.unconfirmedBills, e, t);
                    },
                    previewImage: function(n) {
                        var t = this, i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
                        e.previewImage({
                            urls: n,
                            current: n[i],
                            success: function() {
                                t.$emit("preview-img");
                            }
                        });
                    },
                    navBack: function() {
                        var n = getCurrentPages();
                        n.length < 2 && n[0].route !== u.default.homeUrl ? (0, c.routeToHome)() : e.navigateBack({
                            delta: 1
                        });
                    },
                    submit: (0, o.throttle)(function(e) {
                        var n = this;
                        if (this.isDisabled) this.$toast({
                            title: "请确认所有额外费用"
                        }); else if (1 !== e) {
                            var t = [];
                            if (this.unconfirmedBills.forEach(function(e) {
                                t.push({
                                    bill_type: e.bill_type,
                                    bill_name: e.bill_name,
                                    accept: e.accept
                                });
                            }), (0, r.confirmExtraFee)({
                                order_uuid: this.orderInfo.order_uuid,
                                bills: t
                            }).then(function(e) {
                                n.hide();
                            }).catch(function(e) {
                                n.hide();
                            }), this.isPayCode) {
                                var i = t.findIndex(function(e) {
                                    return 1 !== e.accept;
                                }) > -1 ? 0 : 1;
                                this.$statistics("extra_fee_popup_click", {
                                    order_uuid: this.orderInfo.order_uuid,
                                    is_confirm_result: i
                                });
                            }
                        }
                    }, 1500),
                    goDetail: function(n) {
                        16 === n && e.navigateTo({
                            url: "/pages/orders-subpack/fee-detail/index?type=16&order_uuid=".concat(this.orderInfo.order_uuid)
                        }), 13 === n && this.goCarryService();
                    },
                    goCarryService: function() {
                        var n, t, i = this.orderInfo, o = "".concat(u.default.uAppUrl, "/uapp/?order_uuid=").concat(i.order_uuid, "&city_id=").concat((null === (n = i.addr_info) || void 0 === n || null === (t = n[0]) || void 0 === t ? void 0 : t.city_id) || "", "&order_vehicle_id=").concat(i.order_vehicle_id, "&interest_id=").concat(i.interest_id, "&isInvoice=").concat(2 === Number(i.invoice_type) ? 1 : 0, "&is_porterage_changed=").concat(i.is_porterage_changed, "#/carry/new/carry-service");
                        e.navigateTo({
                            url: "/pages/webview/index?targetUrl=".concat(encodeURIComponent(o))
                        });
                    },
                    loginFail: function() {
                        this.$emit("loginFail");
                    }
                }
            };
            n.default = a;
        }).call(this, t("543d").default);
    },
    "6be4": function(e, n, t) {
        t.r(n);
        var i = t("47aa"), o = t.n(i);
        for (var r in i) [ "default" ].indexOf(r) < 0 && function(e) {
            t.d(n, e, function() {
                return i[e];
            });
        }(r);
        n.default = o.a;
    }
} ]), (global.webpackJsonp = global.webpackJsonp || []).push([ "components/confirm-fee-popup/index-create-component", {
    "components/confirm-fee-popup/index-create-component": function(e, n, t) {
        t("543d").createComponent(t("408c"));
    }
}, [ [ "components/confirm-fee-popup/index-create-component" ] ] ]);